Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_role_assignment - add role_definition_name #775

Merged
merged 5 commits into from
Feb 13, 2018
Merged

azurerm_role_assignment - add role_definition_name #775

merged 5 commits into from
Feb 13, 2018

Conversation

jansepke
Copy link
Contributor

to optimize usability of the role_assignment resource.

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @jansepke

Thanks for opening this PR :)

I've taken a look through and have left a couple of comments in-line this mostly LGTM 👍

Thanks!

"role_definition_name": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add a ConflictsWith on role_definition_id here?

* `role_definition_id` - (Required) The Scoped-ID of the Role Definition. Changing this forces a new resource to be created.
* `role_definition_id` - (Optional, Forces new resource) The Scoped-ID of the Role Definition. Changing this forces a new resource to be created.

* `role_definition_name` - (Optional, Forces new resource) The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with role_definition_id.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we quote role_definition_id?

@@ -97,7 +93,9 @@ The following arguments are supported:

* `scope` - (Required) The scope at which the Role Assignment applies too, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333`, `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`, or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM`. Changing this forces a new resource to be created.

* `role_definition_id` - (Required) The Scoped-ID of the Role Definition. Changing this forces a new resource to be created.
* `role_definition_id` - (Optional, Forces new resource) The Scoped-ID of the Role Definition. Changing this forces a new resource to be created.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a "Conflicts with role_definition_name" here?

@jansepke
Copy link
Contributor Author

jansepke commented Feb 7, 2018

ok, see my last commit. thought that ConflictsWith will automatically work in both directions.

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @jansepke

Thanks for pushing those updates and pushed a commit to fix a minor inconsistency with the rest of the documentation (I hope you don't mind!). I've taken another look through and this now LGTM - the tests pass:

$ acctests azurerm TestAccAzureRMRoleAssignment_
=== RUN   TestAccAzureRMRoleAssignment_importBasic
--- PASS: TestAccAzureRMRoleAssignment_importBasic (42.73s)
=== RUN   TestAccAzureRMRoleAssignment_importCustom
--- PASS: TestAccAzureRMRoleAssignment_importCustom (31.38s)
=== RUN   TestAccAzureRMRoleAssignment_emptyName
--- PASS: TestAccAzureRMRoleAssignment_emptyName (25.69s)
=== RUN   TestAccAzureRMRoleAssignment_roleName
--- PASS: TestAccAzureRMRoleAssignment_roleName (28.47s)
=== RUN   TestAccAzureRMRoleAssignment_builtin
--- PASS: TestAccAzureRMRoleAssignment_builtin (26.42s)
=== RUN   TestAccAzureRMRoleAssignment_custom
--- PASS: TestAccAzureRMRoleAssignment_custom (37.58s)
PASS
ok  	github.com/terraform-providers/terraform-provider-azurerm/azurerm	192.302s

Thanks!

@tombuildsstuff tombuildsstuff changed the title add role_definition_name to role_assignment azurerm_role_assignment - add role_definition_name Feb 13, 2018
@tombuildsstuff tombuildsstuff merged commit d373b59 into hashicorp:master Feb 13, 2018
tombuildsstuff added a commit that referenced this pull request Feb 13, 2018
metacpp pushed a commit that referenced this pull request Feb 13, 2018
@ghost
Copy link

ghost commented Mar 31, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants